package com.huqu.entities;

import java.io.Serializable;

public class Page implements Serializable {

	private int limit;
	private int offset=0;
	private int currentpage=1;
	private int totalpage;
	private int numrow;
	
	
	
	public int getLimit() {
		return limit;
	}
	public void setLimit(int limit) {
		this.limit = limit;
	}
	public int getOffset() {
		return offset;
	}
	public void setOffset(int offset) {
		this.offset = offset;
	}

	public int getCurrentpage() {
		return currentpage;
	}
	public void setCurrentpage(int currentpage) {
		this.currentpage = currentpage;
	}
	public int getTotalpage() {
		return totalpage;
	}
	public void setTotalpage(int totalpage) {
		this.totalpage = totalpage;
	}
	
	public void setTotalpage(int totalrow,int limit) {
		if(totalrow%limit==0){
			this.totalpage = totalrow/limit;
		}else{
			this.totalpage = totalrow/limit+1;
		}
	}
	public int getNumrow() {
		return numrow;
	}
	public void setNumrow(int numrow) {
		this.numrow = numrow;
	}
	
}
